package com.glorystone.ins.domain;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;

import java.math.BigDecimal;
import java.math.BigInteger;
import java.time.LocalDateTime;

/**
 * @author:haoguodong
 * @Date:Created in 10:29 2018/3/17
 */
public @Data class Advance {

    private Long tid;

    private BigDecimal todatAmount;

    private BigDecimal actualAmount;

    private Integer status;

    private BigDecimal applyAmount;

    private Integer auditStatus;

    private Long createBy;

    @JsonSerialize(using = CustomLocalDateTimeSerializer.class)
    private LocalDateTime createAt;

    private Long updateBy;

    @JsonSerialize(using = CustomLocalDateTimeSerializer.class)
    private LocalDateTime updateAt;

    private Integer delFlg;

    private String username;

    private String remark;

    public enum  AuditStatusEnum{
        //审批通过
        CHECK_SUCCESS(1),
        //审批中
        CHECK_FIRST(2),
        //审核驳回
        CHECK_STATUS_REJECT(3);

        private Integer value;

        public Integer getValue(){
            return this.value ;
        }
         AuditStatusEnum(Integer value) {
            this.value = value;
        }
    }

    public enum DeleteFlagEnum {
        //删除标识 0正常 1删除
        NORMAL(0), DELETED(1);

        private Integer value;
        DeleteFlagEnum(Integer value) {
            this.value = value;
        }
        public Integer getValue() {
            return this.value ;
        }
    }
}
